package io.github.noahzu.daka

import android.content.Intent
import android.os.Handler
import android.os.Looper
import android.view.Window

class SplashActivity : BaseActivity() {
    private val handler = Handler(Looper.getMainLooper())

    override fun layoutId(): Int = R.layout.activity_splash

    override fun beforeCreate() {
    }

    override fun afterCreate() {
        handler.postDelayed({
            if(UserManager.isLogin()) {
                startActivity(Intent(this,MainActivity::class.java))
            } else {
                startActivity(Intent(this,LoginUserActivity::class.java))
            }
            finish()
        },1500)
    }
}
